package com.tsd.system.dao;

import com.tsd.common.vo.BatchDeleteLogicVo;
import com.tsd.core.vo.PageBean;
import com.tsd.system.entity.SysUserExt;
import com.tsd.system.entity.SysUserResource;
import com.tsd.system.entity.SysUserResourceExt;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 描述：SysUserResourceMapper
 *
 * @author Hillpool
 * @date 2019/03/12 12:20:51
 */
public interface SysUserResourceMapper {

    SysUserResource selectByPrimaryKey(Long id);

    List<SysUserResourceExt> selectByPage(@Param("params") Map<String, Object> params, @Param("page") PageBean page);

    int deleteByPrimaryKey(Long id);

    int insert(SysUserResource record);

    int insertSelective(SysUserResource record);

    int updateByPrimaryKey(SysUserResource record);

    int updateByPrimaryKeySelective(SysUserResource record);

    SysUserResourceExt selectByObj(SysUserResource record);

    void deleteLogicNotInRoleByUserRole(SysUserResource record);

    void insertByUserRole(SysUserResource record);

    void deleteByUserRole(SysUserResource record);

    void deleteByResSid(String resSid);

    List<SysUserResourceExt> selectByUserSid(String userSid);

    void deleteByUserSid(String userSid);

    List<SysUserExt> selectUserResourceByPermission(@Param("userList") List<String> userList, @Param("permissions") List<String> permissions);

    List<SysUserResourceExt> selectByUserList(@Param("userList") List<String> userList);

    int deleteByIdList(BatchDeleteLogicVo logicVo);

    int insertList(@Param("list") List<SysUserResourceExt> list);

    int updateList(@Param("list") List<SysUserResourceExt> list);
}
